package cn.zymall.merchant.controller;

import cn.zymall.common.feign.fastFile.FastFileFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @ClassName MerchantPhotoController
 * @Description TODO
 * @Author chenmei
 * @Date 2020/8/21 10:56
 * @Version 1.0
 **/
@RestController
@RequestMapping("merchantPhoto")
public class MerchantPhotoController  {
	@Autowired
	FastFileFeign fastFileFeign;

	@PostMapping("upload")
	public String upload(@RequestParam("file") MultipartFile file) {
		System.out.println(file.getOriginalFilename());
		return fastFileFeign.uploadMethod(file);
	}
}
